package cn.com.jslh.boarpro.main.model.breeditems;

import java.util.List;

/**
 * 作者：周洲 on 2017/7/27 08:45
 * <p>
 * 邮箱：double0zhou@126.com
 */

public class ChoseBreedItem extends BreedItem {
    private DataTemplates dataTemplates;
    public ChoseBreedItem(DataTemplates dataTemplates) {
        super(dataTemplates);
        this.dataTemplates = dataTemplates;
    }

    public String[] getStrs(){
        List<SpinnerTemplate> spinnerTemplates =dataTemplates.datas;
        String[] str = new String[spinnerTemplates.size()];
        for (int i = 0; i < spinnerTemplates.size(); i++) {
            str[i]  = spinnerTemplates.get(i).show;
        }
        return str;
    }

    public void chose(int position){
        List<SpinnerTemplate> spinnerTemplates =dataTemplates.datas;
        String value = spinnerTemplates.get(position).id;
        this.setValueTage(value);
    }
}
